package com.qixin.web.controller.Car;


import com.alibaba.fastjson.JSONObject;
import com.qixin.api.bean.ComCar;
import com.qixin.api.bean.ComFile;
import com.qixin.api.bean.FileResult;
import com.qixin.api.bean.WePilejoin;
import com.qixin.api.service.ComCarService;
import com.qixin.api.service.ComFileService;
import com.qixin.api.service.WePilejoinService;
import com.qixin.web.util.SessionUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpSession;
import java.sql.SQLException;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 桩源加盟
 * </p>
 *
 * @author 张子艺
 * @since 2018-10-02
 */
@Controller
@RequestMapping("/chargeAdd")
public class ChargeAddController {
   @Autowired
    WePilejoinService wePilejoinService;
    /**
     * 跳转桩源加盟
     * @return
     */
    @RequestMapping("/chargeAdd.html")
    public String index( ) {
        return   "/Car/chargeAdd";
    }

    /**
     * 添加
     * @return
     */
    @RequestMapping("/chargeAdd")
    @ResponseBody
    public boolean insert(String param) {
        WePilejoin wePilejoin=  JSONObject.parseObject(param, WePilejoin.class);
        return     wePilejoinService.insert(wePilejoin);

    }

    /**
     * 跳转成功页面
     * @return
     */
    @RequestMapping("/success.html")
    public String success( ) {
        return   "/success";
    }


}
